//公共的ip管理
//var http = 'http://10.89.3.5:8080';
//var http = 'http://192.168.31.235:8080';
// 刘
// var http ='http://192.168.31.56:9088';
// var http ='http://192.168.31.74:9088';
// 周
// var http ='http://192.168.31.200:9088';
var http ='http://39.108.75.170:9088';

// 公共ajax请求
function myHttp (url, opt, type, callback) {
	mui.ajax(http + url,{
        data: opt,
        dataType:'json',
        type:type,
        timeout:10000,
        success:function(data){
            if(data.success){
            	callback(data);
            }else{
                callback(data);
                // plus.ui.toast(data.msg);
            }
        },
        error:function(){
        	plus.ui.toast("请检查网络");
			// 异常关闭加载框
			plus.nativeUI.hideWaiting();
        }
    })
};

//获取URL参数值
function getQueryStringArgs() {
    var qs = (location.search.length > 0 ? location.search.substring(1) : ""),
        //保存数据对象
        args = {},
        //取得每一项
        items = qs.length ? qs.split('&') : [],
        item = null, name = null, value = null, i = 0, len = items.length;
    //逐个将每一项添加到args对象中
    for (i = 0; i < len; i++) {
        item = items[i].split('=');
        name = decodeURIComponent(item[0]);
        value = decodeURIComponent(item[1]);
        if (name.length) {
            args[name] = value;
        }
    }
    return args;
}
